﻿using ProjectFootball.MVC.Models.EntityFramework.Entities;
using System.Collections.Generic;
using System.Linq;

namespace ProjectFootball.MVC.Models
{
    public class CombinedSearchViewModel
    {
        public CombinedSearchViewModel()
        {
            Competitions = new List<CompetitionSearchResultViewModel>();
            Countries = new List<CountrySearchResultViewModel>();
            People = new List<PersonSearchResultViewModel>();
            TeamVersions = new List<TeamSearchResultViewModel>();
            Venues = new List<VenueSearchResultViewModel>();
            
        }

        public IEnumerable<CompetitionSearchResultViewModel> Competitions { get; set; }
        public IEnumerable<CountrySearchResultViewModel> Countries { get; set; }
        public IEnumerable<PersonSearchResultViewModel> People { get; set; }
        public IEnumerable<TeamSearchResultViewModel> TeamVersions { get; set; }
        public IEnumerable<VenueSearchResultViewModel> Venues { get; set; }

        public int Count
        {
            get { return Competitions.Count() + Countries.Count() + People.Count() + TeamVersions.Count() + Venues.Count(); }
        }
    }
}